{extend name="public/base"/}
{block name="body"}
<div class="main-box clearfix">
    <header class="main-box-header clearfix">
        <div class="pull-left">
            <h2>{$meta_title}</h2>
        </div>
    </header>
    <div class="main-box-body clearfix">
        <form method="post" class="form form-horizontal">
            {if !isset($info)}
            {assign name="info" value="" /}
            {/if}
            <div class="form-group">
                <label class="col-lg-2 control-label">商品名称</label>
                <div class="col-lg-10 col-sm-10">{$info['title']}</div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">单价</label>
                <div class="col-lg-10 col-sm-10">
                    <input type="text" name="price" value="0">
                </div>
            </div>
            {if $info['operate']=='add'}
            <div class="form-group">
                <label class="col-lg-2 control-label">增加库存</label>
                <div class="col-lg-10 col-sm-10">
                    <input type="text" name="stock" value="0">
                </div>
            </div>
            {else/}
            <div class="form-group">
                <label class="col-lg-2 control-label">减少库存</label>
                <div class="col-lg-10 col-sm-10">
                    <input type="text" name="stock" value="0">
                </div>
            </div>
            {/if}
            <div class="form-group">
                <div class="col-lg-offset-2 col-lg-10">
                    <input type="hidden" name="id" value="{$info['id']|default=''}">
                    <button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
                    <button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}